import request from '@/utils/request'

export function add(data) {
  console.log(data)
  return request({
    url: 'api/goods',
    method: 'post',
    data
  })
}

export function delGoods(id) {
  console.log(id + '---')
  return request({
    url: 'api/goods/' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: 'api/goods',
    method: 'put',
    data
  })
}

export function findGoodsByid(data) {
  return request({
    url: 'api/getGoods/' + data,
    method: 'get'
  })
}
